import request from '@/utils/request'
// 绑定礼品
export function binding(data) {
  return request({
    url: '/brandgifts/brandgifts/brandmembergiftssave/'+data.id,
    method: 'post',
    data: data.cardIds.map(item=>item+'')
  })
}
// 获取绑定礼品
export function getBindingGoods(id) {
  return request({
    url: '/membershipcard/membershipcard/backstagebershipcardgifts/' + id,
    method: 'get'
  })
}
// 查询品牌会员卡列表
export function listMembershipcard(query) {
  return request({
    url: '/membershipcard/membershipcard/list',
    method: 'get',
    params: query
  })
}

// 查询品牌会员卡详细
export function getMembershipcard(id) {
  return request({
    url: '/membershipcard/membershipcard/' + id,
    method: 'get'
  })
}

// 新增品牌会员卡
export function addMembershipcard(data) {
  return request({
    url: '/membershipcard/membershipcard',
    method: 'post',
    data: data
  })
}

// 修改品牌会员卡
export function updateMembershipcard(data) {
  return request({
    url: '/membershipcard/membershipcard',
    method: 'put',
    data: data
  })
}

// 删除品牌会员卡
export function delMembershipcard(id) {
  return request({
    url: '/membershipcard/membershipcard/' + id,
    method: 'delete'
  })
}

// 导出品牌会员卡
export function exportMembershipcard(query) {
  return request({
    url: '/membershipcard/membershipcard/export',
    method: 'get',
    params: query
  })
}